// extends super override
// 类的继承具有单根性
class Father {
  public name:string
  constructor(name: string) {
    this.name = name
  }

  info() { 
    console.log("Father Info")
  }
}


class Child extends Father { 
  public age: number;
  constructor(public name: string, age: number) {
    super(name);
    this.age = age;
  }

  override info(): string {
    console.log("Child Info");
    super.info();
    return "";
  }

}

const f = new Father("father");

const c = new Child("child", 20);
c.info()